Rasterization is a process by which a scene of three-dimensional (3D) polygons is rendered onto a two-dimensional (2D) surface. The rasterization process can be performed in several stages, including a transformation stage, a clipping stage, and a scan conversion stage. The transformation stage converts 3D polygon vertices to vertices on a 2D plane. Once the vertices are transformed to 2D locations, some of vertices may lie may be outside of the viewing window for the scene. The set of vertices may be clipped, such that only vertices within the scene receive further processing.
Once the 3D polygons are transformed to a 2D location and clipped into a viewing window, a scan conversion process is performed to determine which pixels are used to draw the image. Triangles are generally used as the basic primitive for rasterization and graphics rendering hardware can decompose complex polygons into component triangles. The component triangles can be used to perform coverage testing during the scan conversion process. Coverage testing is performed to determine is a given pixel is covered a triangle. If a pixel is to be rendered, the pixel should be at least partially covered by a triangle and not blocked by another pixel. Graphics processor hardware can include dedicated logic to perform coverage testing to determine whether a given pixel of a render target is to be rendered.
During scan conversion, a triangle can produce a fragment for every pixel sample that is within the 2D area of the triangle. A square block of samples can be analyzed determined if a pixel is covered by the triangle. The result of scan converting a triangle is a sequence of fragments that cover the shape of the triangle. Graphics hardware logic can implement an iterator or walker to cover all the candidate blocks to find the covered sample-blocks. Such iterator may consume more than 1 clock cycle per sample-block. Depending on walking algorithm, graphics processor clock cycles may be spent walking sample-blocks that later portions of the graphics rasterization pipeline determines to not be covered by the triangle. The clock cycles spent walking uncovered sample blocks are generally considered wasted, as those cycles are not spent creating useful work for downstream elements of the processor pipeline.